package com.itheima.demo5;

public class Demo {
    public static void main(String[] args) {
        Warehouse warehouse = new Warehouse(10);
        Consume c1 =new Consume(warehouse);
        Produce p1 = new Produce(warehouse);

        Thread t1 =new Thread(c1);
        Thread t2 =new Thread(p1);

        t1.start();
        t2.start();
    }
}
